package org.f0rb.demo.dao;

import java.util.List;

/**
 * Class org.f0rb.demo.dao description goes here.
 *
 * @author Administrator
 * @version 1.0.0 11-9-24
 */
public interface HibernateDAO<T> extends DAO<T> {
    /**
     * Method merge ...
     *
     * @param t of type T
     * @return T
     */
    T merge(T t);

    /**
     * Method attachDirty ...
     *
     * @param instance of type T
     */
    void attachDirty(T instance);

    /**
     * Method attachClean ...
     *
     * @param instance of type T
     */
    void attachClean(T instance);

    /**
     * Method load ...
     *
     * @param id of type Integer
     * @return T
     */
    T load(Integer id);

    /**
     * Method updateByNamedQuery ...
     *
     * @param queryName of type String
     * @return int
     */
    int updateByNamedQuery(String queryName);

    /**
     * Method updateByNamedQuery ...
     *
     * @param queryName of type String
     * @param value of type Object
     * @return int
     */
    int updateByNamedQuery(String queryName, Object value);

    /**
     * Method updateByNamedQuery ...
     *
     * @param queryName of type String
     * @param values of type Object[]
     * @return int
     */
    int updateByNamedQuery(String queryName, Object[] values);

    /**
     * Method findByNamedQuery ...
     *
     * @param queryName of type String
     * @return List
     */
    List findByNamedQuery(String queryName);

    /**
     * Method findByNamedQuery ...
     *
     * @param queryName of type String
     * @param value of type Object
     * @return List
     */
    List findByNamedQuery(String queryName, Object value);

    /**
     * Method findByNamedQuery ...
     *
     * @param queryName of type String
     * @param values of type Object[]
     * @return List
     */
    List findByNamedQuery(String queryName, Object[] values);

    /**
     * Method listPartByNamedQuery ...
     *
     * @param queryName of type String
     * @param start of type int
     * @param limit of type int
     * @return List
     */
    List pageByNamedQuery(String queryName, int start, int limit);

    /**
     * Method listPartByNamedQuery ...
     *
     * @param queryName of type String
     * @param value of type Object
     * @param start of type int
     * @param limit of type int
     * @return List
     */
    List pageByNamedQuery(String queryName, Object value, int start, int limit);
}
